import request from "/@/utils/request"
// 获取表格数据
export function fetchList(query) {
    return request({
        url: '/om/ommintenanceplan/page',
        method: 'get',
        params: query
    })
}
// 新增
export function addObj(obj) {
    return request({
        url: '/om/ommintenanceplan',
        method: 'post',
        data: obj
    })
}
// 删除
export function delObj(id) {
    return request({
        url: '/om/ommintenanceplan/' + id,
        method: 'delete'
    })
}
// 修改
export function putObj(obj) {
    return request({
        url: '/om/ommintenanceplan',
        method: 'put',
        data: obj
    })
}
//批量删除
export function delAllObj(obj) {
    return request({
        url: '/om/ommintenanceplan/removeByIds',
        method: 'delete',
        data: obj
    })
}
// 获取知识库数据
export function getRepositoryList(query) {
    return request({
        url: '/om/omoknowledge/page',
        method: 'get',
        params: query
    })
}
// 获取设备模版数据
export function getTemplateList() {
    return request({
        url: '/admin/omequipmentmodel/page?current=1&size=999',
        method: 'get',
    })
}
// 获取维修区域数据
export function getRegionList(query) {
    return request({
        url: '/admin/accessSubarea/page?current=1&size=999',
        method: 'get',
        params: query
    })
}
// 执行时间
export function execute(obj) {
    return request({
        url: '/om/ommintenanceplan/execute',
        method: 'post',
        data: obj
    })
}